Combobox for date entry

The TVPAComboCal class is a combo box which provides an easy way to edit a date. The dropping down list is replaced by a calendar, allowing to quickly select a day, change the year or the month.

Properties :	Events :

Date	OnCloseUp

Year	OnDropDown

Month

Day

DateStyle

Separator

Language

BeepOnCancel

PopupColor

ButtonColor

YearColor

MonthColor

DayNameColor

LineColor

DayColor

SundayColor

PopupColor3DLight

PopupColor3DMedium

PopupColor3DDark


Date property

property Date: TDateTime;

The Date property is used to read or set the displayed date in the TDateTime format. Any change to the Date property will be reflected to the display and to the Year, Month and Day properties.


Year property

property Year: Word;

The Year property is used to read or set the displayed year in the date. Any change to the Year property will be reflected in the display as in the Date property. Valid years are from 1 to 9999 and must be compatible with the Month and Day properties: if Day=29 and Month=2, any non-leap year assignment would generate an error.


Month property

property Month: Word;

The Month property is used to read or set the displayed month in the date. Any change to the Month property will be reflected in the display as in the Date. Valid months are from 1 (January) to 12 (December) and must be compatible with the Day property: if Day=31, any non-31 days months assignment would generate an error.


Day property

property Day: Word;

The Day property is used to read or set the displayed day in the date. Any change to the Day property will be reflected in the display and in the Date property.


DateStyle property

property DateStyle: TDateStyle;

The DateStyle property determines the format of the date display in the VPAComboCal box. The possible styles are the following :

Style :	Example :

yyyy_mm_dd	1996.02.07

dd_mm_yyyy	07.02.1996

xd_month_yyyy	7 February 1996

mm_dd_yyyy)	02.07.1996

When entering a date into the VPAComboCal directly in the edit field, the format must be conform to the selected DateStyle. In the over example, if the DateStyle was xd_month_yyyy , you could not enter "7 02 1996" in the field, you would have to give the full name of the month, respecting character case.


Separator property

property Separator: TSeparator

Separator :	Example :

Dash	1996-02-07

Slash	1996 / 02 / 07

Point	1996.02.07

None	1996 02 07


Language property

property language: TLangue;

The Language property determines the language used for displaying week-days abbreviations and months names.

Basic Languages available : English and French. Other languages might be available, look in the object inspector to see which ones are supported.


BeepOnCancel property

property BeepOnCancel: Boolean;

The BeepOnCancel property is provided to capture user attention when the VPAComboCal closes without updating the displayed date. This can occur if the user presses the ESC key, or if the operation is canceled by releasing the mouse button outside the dropped calendar with no cell selected.


OnDropDown event

This event occurs after the calendar window appears on the screen.


OnCloseUp event

This event occurs after the calendar window closes.


Color properties

All color properties are of type TColor;

PopupColor	Background window color for the calendar. Default is clSilver;

ButtonColor	Button color for the buttons. Should be different than PopupColor3DLight, PopupColor3DMedium and PopupColor3DDark

YearColor	Color for the year in the calendar

MonthColor	Color for the month in the calendar

DayNameColor	Color for the two-letters day names in the calendar

LineColor	Color for the line below the names of the days

DayColor	Color of the numbers for the days, in the calendar cells

SundayColor	Color for the numbers for the Sundays in the calendar cells

PopupColor3DLight	Color for the rendering of 3D effects. Default is clWhite

PopupColor3DMedium	Color for the rendering of 3D effects. Default is clGray

PopupColor3DDark	Color for the rendering of 3D effects. Default is clBlack